package com.gjh.study.mybatis.mapper2;

import com.gjh.study.mybatis.domain.Person;
import org.apache.ibatis.annotations.*;

/**
 * @author guangjh
 * @version 1.0
 * @date 2020/7/11 17:29
 */
@CacheNamespace(implementation = com.gjh.study.mybatis.cache.MyCustomCache.class)
public interface PersonMapper {
    @Select("select * from person where id = #{id}")
    @Options(useCache = true)
    public Person selectPersonById(Long id);

    @Update("update person set name = #{name} where id=#{id}")
    public int updatePerson(Person p);
}
